package com.zq.learing.base.关键字;

import java.util.ArrayDeque;
import java.util.Queue;

/**
 * @Author: zhaoqi
 * @Date: 11/7/2019 7:03 PM
 * @Version 1.0
 */

public class FinallyTest1 {

    public static void main(String[] args) {

        //AbstractAutoProxyCreator
        Queue queue = new ArrayDeque();
        queue.add(1);
        queue.add(2);
        System.out.println(queue);
        queue.remove(1);
        System.out.println(queue);

        System.out.println(test1());
    }

    public static int test1() {
        int b = 20;
        try {
            System.out.println("try block");
            return b += 80;
        } catch (Exception e) {
            System.out.println("catch block");
        } finally {
            System.out.println("finally block");
            if(b > 25) {
                System.out.println("b>25, b = " + b);
            }
        }
        return b;
    }
}
